﻿const log = require('./logger');

log('message');


// Path Module
const path = require('path');
var pathObj = path.parse(__filename);

console.log(pathObj);

// OS Module
const os = require('os');
var totalMemory = os.totalmem();
var freeMemory = os.freemem();

console.log("Total Memory:" + totalMemory);
console.log("Free Memory:" + freeMemory);

// fs module
const fs = require('fs');

// const files = fs.readdirSync('./');
// console.log(files);

fs.readdir('./',function (err,files){
    if(err){
        console.log('Error',err);
    }else{
        console.log('Result',files);
    }
});

// Http module
const http = require('http');
const server = http.createServer();
server.on('Connection',(socket) => {
   console.log('new connection...');
});

server.listen(3000);

console.log("Listening on port 3000...");

